package com.neuedu.my12306.util;

public class UserinfoUtil {

	public static String getSex(String sexCode) {
		if ("M".equals(sexCode)) {
			return "男";
		} else if ("F".equals(sexCode)) {
			return "女";
		} else {
			return "N/A";
		}
	}

	public static String getCardType(String cardType) {
		if(cardType==null) {
			return "N/A";
		}
		switch (cardType) {
		case "1":
			return "二代身份证";
		case "C":
			return "港澳通行证";
		case "G":
			return "台湾通行证";
		case "B":
			return "护照";
		default:
			return "N/A";
		}
	}

	public static String getPassengerType(String passengerType) {
		if(passengerType==null) {
			return "N/A";
		}
		switch (passengerType) {
		case "1":
			return "成人";
		case "2":
			return "儿童";
		case "3":
			return "学生";
		case "4":
			return "残疾军人、伤残人民警察";
		default:
			return "N/A";
		}
	}
}
